package com.example.demo.Impl;

import com.example.demo.entity.MbtiQuestion;
import com.example.demo.repository.MbtiQuestionRepository;
import com.example.demo.service.MbtiQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MbtiQuestionServiceImpl implements MbtiQuestionService {

    @Autowired
    private MbtiQuestionRepository mbtiQuestionRepository;

    @Override
    public List<MbtiQuestion> getAllQuestions() {
        return mbtiQuestionRepository.findAllByOrderByQuestionNumberAsc();
    }
}
